//
//  GJFMerchantModel.m
//  Wedding
//
//  Created by 郭静芬 on 2017/1/2.
//  Copyright © 2017年 郭静芬. All rights reserved.
//

#import "GJFMerchantModel.h"

@implementation GJFMerchantModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.myId  = value;
    }
}

+ (NSDictionary *)mj_objectClassInArray {
    return @{@"myCase": [GJFCaseModel class]};
}


- (void)setBanner:(NSString *)banner {
    _banner = banner;
    [self banner_res];
}

- (UIImage *)banner_res {
    if (!_banner_res) {
        UIImageView *image = [UIImageView new];
        [image sd_setImageWithURL:[NSURL URLWithString:self.banner] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
            _banner_res = image;
        }];
    }
    return _banner_res;
}
@end

@implementation GJFCaseModel
+ (NSDictionary *)mj_objectClassInArray {
    return @{@"imgs": [GJFImgsModel class]};
}
@end

@implementation GJFImgsModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.myId  = value;
    }
}
@end


